package com.example.experiment4;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvFileSource;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class CalculateTest {

    @DisplayName("基于决策表的测试")
    @ParameterizedTest
    @CsvFileSource(resources = "/基于决策表的测试.csv")
    public void test (String start_time, String end_time, double expected) {
        Calculate calculate = new Calculate(start_time, end_time);
        double result = calculate.calculateFree();
        assertEquals(expected, result);
    }

}
